
// 计算播放窗口大小
import { SplitScreen } from '../enum'
export const getVideoWindowSize = (widows: number):any[] => {
	if (widows == 1) {
		return [100, 100]
	}
	if (widows == 4) {
		return [50, 50]
	}
	if (widows == 9) {
		return [33.33, 33.33]
	}
	if (widows == 16) {
		return [25, 25]
	}
	return [100, 100]

}

// 添加数据自动分屏

export const autoSplitScreen = (data: any[]) => {
	const Len = data.length
	if (Len <= SplitScreen.ONE) {
		return SplitScreen.ONE
	} else if(Len <= SplitScreen.FOUR){
		return SplitScreen.FOUR
	} else if(Len <= SplitScreen.NINE){
		return SplitScreen.NINE
	}
	return SplitScreen.SIXTEEN
}